<template>
	<!-- 未继续使用 -->
	<view class="continse">
		<view class="inseli" v-for="(item,index) in continues" :key="index">
			<view class="inseli_1">
				<view style="font-size: 30rpx;color: rgba(68, 68, 68, 1);">{{item.user.name}}</view>
				<view style="font-size: 22rpx;color:RGBA(110, 110, 110, 1);margin: 0 55rpx;">{{item.user.level_name}}</view>
			</view>
			<view class="inseli_1">
				<view style="font-size: 22rpx;color: rgba(86, 86, 86, 1);">{{item.user.tel}}</view>
				<view style="font-size: 22rpx;color:RGBA(110, 110, 110, 1);margin: 0 55rpx;">{{item.user.date}}</view>
			</view>
			<!-- 标记 -->
			<view class="biaoji">
				<image @tap="tasg(item.user.uid,item.user.tag,index)" v-if="item.user.tag" src="../../static2/biaoji.png" mode=""></image>
				<image @tap="tasg(item.user.uid,item.user.tag,index)" v-else src="../../static2/weibiaoji.png" mode=""></image>
				<text class="biaojis" v-if="item.user.tag" style="color: rgba(88, 208, 106, 1);">标记</text>
				<text class="biaojis" v-else style="color: rgba(52, 52, 52, 1);">标记</text>
			</view>

			<view class="inseli_2">
				<text>{{item.str[0]}}</text>
				<text>{{item.str[1]}}</text>
			</view>
			<!-- 拨号 -->
			<view class="bohao" @tap="baohao(index)">
				<image src="../../static2/bohao.png" mode="" style="width: 40rpx;height: 40rpx;margin-right: 11rpx;"></image>
				<text class="yijian">一 键 拨 号</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 0,
				continues: []
			}
		},
		onShow() {
			this.continued()
		},
		methods: {
			continued() {
				var vm = this
				vm.page = vm.page + 1
				vm.req.post(
					vm.lochost + '/index/index?method=not_continue_use_user_list', {
						page: vm.page,
						size: 10
					}, {},
					function(res) {
						console.log(res.data.data);
						var user_list = res.data.data
						for (let i = 0; i < user_list.length; i++) {
							vm.continues.push(user_list[i])
						}
					}
				)
			},
			tasg(id, bj, index) {
				var vm = this
				vm.req.post(
					vm.lochost + '/index/index?method=click_tag', {
						uid: id,
						type: 2,
						tag: bj
					}, {},
					function(res) {
						console.log(res);
						if (res.code == 200) {
							var continues = vm.continues
							vm.req.each(continues, function(i, v) {
								if (index == i) {
									if (v.user.tag == res.data.tag) {
										v.user.tag = res.data.tag;
									} else {
										v.user.tag = res.data.tag;
									}
									continues[i] = v;
								}
							})
							vm.continues = continues
						}

					}
				)

			},
		}
	}
</script>

<style>
	.inseli {
		width: 750rpx;
		height: 220rpx;
		background-color: #FFFFFF;
		margin-bottom: 10rpx;
	}

	.inseli_1 {
		display: flex;
		justify-content: space-between;
		transform: translateY(15rpx);
		margin: 0 24rpx;
	}

	.biaoji image {
		position: absolute;
		/* top: 120rpx; */
		left: 690rpx;
		width: 40rpx;
		height: 40rpx;
		margin-top: -60rpx;
	}

	.biaojis {
		position: absolute;
		left: 690rpx;
		margin-top: -15rpx;
		font-size: 22rpx;
	}

	.inseli_2 {
		display: flex;
		justify-content: space-between;
		margin: 0 25rpx;
		transform: translateY(50rpx);
		font-size: 24rpx;
	}
	.bohao{
		margin-top: 60rpx;
		text-align: center;
	}
	.yijian{
		font-size: 35rpx;
		color: rgba(80, 160, 254, 1);
	}
</style>
